<?php 
use \PsiFramework\Classes\Util\UI\Printer;
use \PsiFramework\Classes\Util\UI\HTML;

$debug = $response->getAttribute("debug");
$logger = $response->getAttribute("logger");
?>
<!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="utf-8">
        <title>e-coaching</title>
        <!-- meta -->
        <meta name="description" content="PsiFramework Error">
        <meta name="author" content="Rémi San">

        <!-- Scripts -->
        <?php
        foreach ($templateManager->getRemoteScripts() as $remote) {
        ?>
        <script
            type="text/javascript"
            src="<?php Printer::display($remote); ?>"></script>
        <?php
        }
        if ($templateManager->hasScriptFiles()) { ?>
        <script
            type="text/javascript"
            src="Scripts/scripts.php?file=<?php Printer::display($templateManager->getScriptFileList()); ?>"></script>
        <?php
        }
        if ($templateManager->hasScripts()) { ?>
        <script type="text/javascript">
            <?php echo $templateManager->getScriptList(); ?>
        </script>
        <?php
        }
        ?>
        
        
        <!-- Styles -->
        <?php
        foreach ($templateManager->getRemoteStyles() as $remote) {
        ?>
        <link
            rel="stylesheet"
            type="text/css"
            href="<?php Printer::display($remote); ?>"
            media="screen" />
        <?php
        }
        
        if ($templateManager->hasStyleFiles()) {
        ?>
        <link
            rel="stylesheet"
            type="text/css"
            href="Styles/styles.php?file=<?php Printer::display($templateManager->getStyleFileList()); ?>"
            media="screen" />
        <?php
        }
        
        if ($templateManager->hasStyles()) {
        ?>
        <style type="text/css" media="screen">
            <?php echo $templateManager->getStyleList(); ?>
        </style>
        <?php
        }
        ?>

    </head>
    <body>
        <?php $templateManager->displayTemplate('main', $response);  ?>
        <?php $templateManager->displayTemplate('Debug', $response);  ?>
    </body>
</html>
